import { Component } from 'react'
import "taro-ui/dist/style/components/avatar.scss";
import "taro-ui/dist/style/components/search-bar.scss";
import "taro-ui/dist/style/components/icon.scss";
import "taro-ui/dist/style/components/button.scss" // 按需引入
import './myhang.less'
import { View,Text } from '@tarojs/components'
import { AtTag } from 'taro-ui'
import "taro-ui/dist/style/components/tag.scss";
import TabBar from './TabBar'
import Taro　from '@tarojs/taro';

export default class Myhang extends Component {
  constructor(){
    super(),
    this.state=({
      persons: [],
    })
  }
  componentDidMount(){
    Taro.request({
         url:'http://localhost:8080/myhang',
       }).then(res=>{
         this.setState({
            persons:res.data
         })
       })
  }
    render () {
      return this.state.persons.map((item,index)=> {
      return (
        <View>
        <View className="header">
          <View>
            <Text className="ftext">就诊人：</Text>
            <Text className="ntext">{item.username}</Text>
          </View>
          <View>
            <Text className="ftext">就诊机构：</Text>
            <Text className="ntext">{item.jigou}</Text>
          </View>
          <View>
            <Text className="ftext">就诊科室：</Text>
            <Text className="ntext">{item.keshi}</Text>
          </View>
          <View>
            <Text className="ftext">就诊医师：</Text>
            <Text className="ntext">{item.yishi}</Text>
          </View>
          <View>
            <Text className="ftext">预约时间：</Text>
            <Text className="ntext">{item.time}</Text>
          </View>

          <View className="tag1">
            <View className="tag2">
            {item.guashi}
            </View>
            <View className="tag3">
            {item.shu}
            </View>
          </View>

        </View>
          {/* <View className="nheader">
            <View>
              <Text className="ftext">就诊人：</Text>
              <Text className="ntext">张小萌</Text>
            </View>
            <View>
              <Text className="ftext">就诊机构：</Text>
              <Text className="ntext">东里社区卫生服务中心国医堂</Text>
            </View>
            <View>
              <Text className="ftext">就诊科室：</Text>
              <Text className="ntext">中医科</Text>
            </View>
            <View>
              <Text className="ftext">就诊医师：</Text>
              <Text className="ntext">张大山</Text>
            </View>
            <View>
              <Text className="ftext">预约时间：</Text>
              <Text className="ntext">2020-09-21 周一 上午</Text>
            </View>

            <View className="tag1">
              <View className="tag2">
                专家号
              </View>
              <View className="tag3">
                39
              </View>
            </View>

          </View>

          <View className="neheader">
            <View>
              <Text className="ftext">就诊人：</Text>
              <Text className="ntext">张小萌</Text>
            </View>
            <View>
              <Text className="ftext">就诊机构：</Text>
              <Text className="ntext">东里社区卫生服务中心国医堂</Text>
            </View>
            <View>
              <Text className="ftext">就诊科室：</Text>
              <Text className="ntext">中医科</Text>
            </View>
            <View>
              <Text className="ftext">就诊医师：</Text>
              <Text className="ntext">张大山</Text>
            </View>
            <View>
              <Text className="ftext">预约时间：</Text>
              <Text className="ntext">2020-09-21 周一 上午</Text>
            </View>

            <View className="tag1">
              <View className="tag2">
                专家号
              </View>
              <View className="tag3">
                39
              </View>
            </View>

          </View> */}
          <TabBar current={3}></TabBar>
        </View>




      );
      })
  
    }
  }
